package cc.marcio.systems.seven.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;

@Entity
@Table(name = "t_contactdom", uniqueConstraints = { @UniqueConstraint(columnNames = { "id" }) })
@SequenceGenerator(name = "seq_contactdom", sequenceName = "seq_contactdom")
public class ContactDom implements Serializable {

	private static final long serialVersionUID = -3607449689209057656L;

	@Transient
	public static final Long CELL_ID = 1L;
	
	@Transient
	public static final Long EMAIL_ID = 2L;
	
	@Transient
	public static final Long HOME_PHONE_ID = 3L;
	
	@Transient
	public static final Long BUSINESS_PHONE_ID = 4L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_contactdom")
	@Column( unique = true, insertable = false, updatable = false )
	private Long id;
	
	@Column( nullable = false, unique = true, insertable = true, updatable = true )
	private String description;
	
	public ContactDom() { }
	
	public ContactDom(Long id) {
		this();
		this.id = id;
	}
	
	public ContactDom(String description) {
		this();
		this.description = description;
	}
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
}